import request from '@/utils/request'

// 查询门禁管理列表
export function listControl(query) {
  return request({
    url: '/access/control/list',
    method: 'post',
    data: query
  })
}

// 查询门禁管理列表
export function getAccess() {
  return request({
    url: '/access/control',
    method: 'get'
  })
}

// 查询门禁管理详细
export function getControl(id) {
  return request({
    url: '/access/control/' + id,
    method: 'get'
  })
}

// 新增门禁管理
export function addControl(data) {
  return request({
    url: '/access/control',
    method: 'post',
    data: data
  })
}

// 修改门禁管理
export function updateControl(data) {
  return request({
    url: '/access/control',
    method: 'put',
    data: data
  })
}

// 删除门禁管理
export function delControl(id) {
  return request({
    url: '/access/control/' + id,
    method: 'delete'
  })
}

// 新增用户权限
export function addAccessUser(query) {
  return request({
    url: '/access/control/addAccessUser',
    method: 'post',
    data: query
  })
}


export function subAuthList(data){
  return request({
    url: '/access/control/subAuth/list',
    method: 'post',
    data: data
  })
}

export function subStaffList(data){
  return request({
    url: '/access/control/subStaff/list',
    method: 'post',
    data: data
  })
}




